package com.thz.houserental.domain.house;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.util.Date;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("house")
public class House {
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 房东（用户id)
     */
    @NotEmpty
    private String landlord;
    
    /**
     * 租期
     */
    private String leaseTerm;

    /**
     * 类型
     */
    private String type;

    /**
     * 户型
     */
    private String houseType;
    
    /**
     * 房屋价格
     */
    private Double price;

    /**
     * 位置
     */
    private String location;

    /**
     * 押金
     */
    private Double deposit;

    /**
     * 面积
     */
    private Double area;

    /**
     * 楼层
     */
    private Integer floor;

    /**
     * 详情描述
     */
    private String description;

    /**
     * 标签(多个便签以分号分割)
     */
    private String tag;

    /**
     * 图片资源
     */
    private String images;

    /**
     * 视频资源
     */
    private String mp4s;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    
    private Integer online;
}
